package by.vr.jpa.result.transformer.impl;

import by.vr.jpa.result.transformer.api.EntityInstantiator;

public class EntityInstantiatorFactory {
	
	private static final EntityInstantiator PROXY = new ProxyEntityInstantiator();
	
	private static final EntityInstantiator SIMPLE = new SimpleEntityInstantiator();
	
	
	public static EntityInstantiator getInstantiator(boolean proxy){
		if(proxy){
			return PROXY;
		}else{
			return SIMPLE;
		}
		
	}
	
	public static EntityInstantiator getInstantiator(){
		return getInstantiator(true);
		
	}
	
	

}
